<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

//Route::get('/', function () {
////    return 456;
//    return view('shouye');
////    return 123;
////    return view("welcome");
//});


//加载首页
Route::get("/","EntryController@index");



//加载注册页
Route::get("/index","LoginController@index")->name("index");
//加载注册页方法：
Route::post("/longin","LoginController@longin")->name("longin");



//开始写登录
//加载登录页
Route::get("/register","RegisterController@register")->name("register");
//加载登录方法
Route::post("/denglu","RegisterController@denglu")->name("denglu");

//退出登录的方法
Route::get("/logout","RegisterController@logout")->name("logout");


//加载修改资料摸板路由
Route::get("/password","ChangePassword@password")->name("password");
//加载修改资料的后台逻辑处理代码路由
Route::post("/mima","ChangePassword@mima")->name("mima");


//配置用户列表的资源路由
Route::resource("/user","UserController");



//配置激活邮箱路由
Route::get("/jihuo/{token}","LoginController@jihuo")->name("jihuo");


//配置忘记密码模板路由
Route::get("/wangji","ForgetController@wangji")->name("wangji");

//配置忘记密码后台处理逻辑路由
Route::post("/code","ForgetController@code")->name("code");

//配置修改密码的模板路由
Route::get("/gaimima/{email}","ForgetController@gaimima")->name("gaimima");

//配置修改密码的后台处理代码
Route::post("/xiugai","ForgetController@changemima")->name("xiugai");


//配置文章管理资源路由
Route::resource("/blog","BlogController");